# -*- coding: utf-8 -*-

"""StaffLog - Terminal
@version: 0.1
@license: GPL 3.0 (see "license" file)
@author: Jose A. Jimenez <jajimc@gmail.com>, Miguel Centeno <miguelcent@gmail.com>"""

import gtk

class DialError:
    def __init__(self, message):
        self.gladeFile = "dialerror.glade"
        self.builder = gtk.Builder()
        self.builder.add_from_file(self.gladeFile)
        self.dialError = self.builder.get_object("dialError")
        self.labMessage = self.builder.get_object("labMessage")
        
        if type(message) == str:
            self.labMessage.set_text(message)
        
    def run(self):
        self.dialError.show_all()
        self.dialError.run()
        self.dialError.destroy()
